package com.sys.entity;

import com.bhudy.annotation.PrimaryKey;
import com.sys.utils.Utils;

import java.util.List;

/**
 * @Author com.bhudy
 * @Description 文件读写，代码生成
 * @Date 2019-10-30 23:09:37
 */
public class TxtExport {

    @PrimaryKey
    private String packagePath;
    private String classPath;
    private String path;
    private String className;
    private List<String> fields;
    private List<String> jdbcTypes;
    private List<String> dataTypes;
    private List<String> keys;
    private List<String> types;
    private List<String> comments;
    private List<String> selectList;
    private List<String> columns;
    private Boolean select;
    private Boolean insert;
    private Boolean update;
    private Boolean delete;

    public String getPackagePath() {
        return packagePath;
    }

    public void setPackagePath(String packagePath) {
        this.packagePath = packagePath;
    }

    public String getClassPath() {
        String[] strs = this.getPackagePath().split("\\.");
        String str = "";
        for (int i = 1; i < strs.length; i++){
            String s = strs[i];
            str += s + "\\";
        }
        return this.getPackagePath().replaceAll("\\.", "\\\\");
    }

    public String getClass2Path(){
        String[] strs = this.getPackagePath().split("\\.");
        String str = "";
        for (int i = 1; i < strs.length; i++){
            String s = strs[i];
            str += s + "\\";
        }
        return str;
    }

    public void setClassPath(String classPath) {
        this.classPath = classPath;
    }

    public String getPath() {
        return System.getProperty("user.dir") + "\\src\\main\\java\\" + this.getClassPath() + "\\";
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getClassName() {
        return Utils.toUpperCaseFirstOneDel(className);
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public List<String> getFields() {
        return fields;
    }

    public void setFields(List<String> fields) {
        this.fields = fields;
    }

    public List<String> getJdbcTypes() {
        return jdbcTypes;
    }

    public void setJdbcTypes(List<String> jdbcTypes) {
        this.jdbcTypes = jdbcTypes;
    }

    public List<String> getDataTypes() {
        return dataTypes;
    }

    public void setDataTypes(List<String> dataTypes) {
        this.dataTypes = dataTypes;
    }

    public List<String> getKeys() {
        return keys;
    }

    public void setKeys(List<String> keys) {
        this.keys = keys;
    }

    public List<String> getTypes() {
        return types;
    }

    public void setTypes(List<String> types) {
        this.types = types;
    }

    public List<String> getSelectList() {
        return selectList;
    }

    public void setSelectList(List<String> selectList) {
        this.selectList = selectList;
    }

    public List<String> getComments() {
        return comments;
    }

    public void setComments(List<String> comments) {
        this.comments = comments;
    }

    public List<String> getColumns() {
        return columns;
    }

    public void setColumns(List<String> columns) {
        this.columns = columns;
    }

    public Boolean getSelect() {
        return select;
    }

    public void setSelect(Boolean select) {
        this.select = select;
    }

    public Boolean getInsert() {
        return insert;
    }

    public void setInsert(Boolean insert) {
        this.insert = insert;
    }

    public Boolean getUpdate() {
        return update;
    }

    public void setUpdate(Boolean update) {
        this.update = update;
    }

    public Boolean getDelete() {
        return delete;
    }

    public void setDelete(Boolean delete) {
        this.delete = delete;
    }

    /*public String getSelect() {
        return select;
    }

    public void setSelect(String select) {
        this.select = select;
    }

    public String getInsert() {
        return insert;
    }

    public void setInsert(String insert) {
        this.insert = insert;
    }

    public String getUpdate() {
        return update;
    }

    public void setUpdate(String update) {
        this.update = update;
    }

    public String getDelete() {
        return delete;
    }

    public void setDelete(String delete) {
        this.delete = delete;
    }*/
}
